package org.karesz.code.bean;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.karesz.code.model.Team;







@Stateless
public class TestBean {

		
	
	@PersistenceContext
	private EntityManager em;
	
	
	public String addText(){

		Team padej = new Team();
		padej.setName("Tisa Padej");
	
		em.persist(padej);
		
		return "TEXT FROM EJB";
	}
	
	public void save(Team team){
		em.persist(team);
	}


	public EntityManager getEm() {
		return em;
	}


	public void setEm(EntityManager em) {
		this.em = em;
	}
	
	
	
}
